﻿@model VietPremier.Models.GetDestinationModel
@{
    ViewBag.Title = ViewBag.Titletag;
    ViewBag.Description = ViewBag.Meta_description;
    ViewBag.Keywords = ViewBag.Meta_keyword;
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@helper Truncate(string input, int length)
{
    if (input.Length <= length)
    { 
        @Html.Raw(input)
    }
    else
    { 
        @Html.Raw(input.Substring(0, length))<text>...</text>
    }
}

<div class="content container-fluid">
    <div class="row-fluid">
        <div class="span3">
            @Html.Partial("_Maps");
            @Html.Action("LeftMenu", "Home")
            @Html.Action("Onlinesupport", "Home")
            @Html.Action("News_Event", "Home")  
            <!--/ .box-->
        </div>
        <!--/ .span3-->
        <div class="span9">
            <div class="link-page">
                <a href="@Url.Action("Index","Home")">Trang chủ&nbsp;<img src="@Url.Content("~/Content/cssFrontEnd/images/iconmt.png")" />&nbsp;</a>
                <a href="@Url.Action("Index","Destination")">Thông tin du lịch&nbsp;<img src="@Url.Content("~/Content/cssFrontEnd/images/iconmt.png")">&nbsp;</a>
                <a href="@Url.Action("DestinationCountryList", "Destination", new { title = Utilities.Encode(ViewBag.AreaName)})">@ViewBag.AreaName&nbsp;<img src="@Url.Content("~/Content/cssFrontEnd/images/iconmt.png")">&nbsp;</a>
                <span class="current" >@ViewBag.CountryName</span>
               <h3>Tour Liên quan</h3>
            </div>
            @Html.Action("DestinationCountry", "Destination", new { id = ViewBag.IdCountry})
           <div class="box-about">
            @if (Model != null)
            {
                
                <div class="row-fluid">
                    @{
                int count = Model.listDestination.Count;
                        <div class="span6 wheretosay">
                            @for (int i = 0; i < (count % 2 == 0 ? count / 2 : count / 2 + 1); i++)
                            {
                                var imageFile = string.Concat("~/Content/upload/destination/", Model.listDestination[2 * i].Image);                
                                <div class="it">
                                    <div class="img">
                                        <div class="img-inner">
                                            <a href="@Url.RouteUrl("", new { controller = "Destination",  action = "DestinationDetail", title = Utilities.Encode(ViewBag.CountryName),  name = Utilities.Encode(ViewBag.AreaName), destination = Utilities.Encode(Model.listDestination[2 * i].Name) })">
                                                <img src="@Url.Content(imageFile)" style="width:100px; height:100px" /></a>
                                        </div>
                                    </div>
                                    <h4><a class="title" href="@Url.RouteUrl("", new { controller = "Destination",  action = "DestinationDetail", title = Utilities.Encode(ViewBag.CountryName),  name = Utilities.Encode(ViewBag.AreaName), destination = Utilities.Encode(Model.listDestination[2 * i].Name) })">@Model.listDestination[2 * i].Name</a></h4>
                                   
                                    <span>@Model.listDestination[2 * i].Description...</span>
                                </div>
                            }
                        </div>
                        <!--/ .span6 wheretosay-->
                        <div class="span6 wheretosay">
                            @for (int i = 0; i < (count % 2 == 0 ? count / 2 : count / 2 + 1); i++)
                            {
                                if (2 * i + 1 < count)
                                {
                                    var imageFile = string.Concat("~/Content/upload/destination/", Model.listDestination[2 * i + 1].Image);
                                <div class="it">
                                    <div class="img">
                                        <div class="img-inner">
                                            <a href="@Url.RouteUrl("", new { controller = "Destination",  action = "DestinationDetail",  title = Utilities.Encode(ViewBag.CountryName),  name = Utilities.Encode(ViewBag.AreaName), destination = Utilities.Encode(Model.listDestination[2 * i + 1].Name) })">
                                                <img src="@Url.Content(imageFile)" style="width:100px; height:100px" /></a>
                                        </div>
                                    </div>
                                    <h4><a class="title" href="@Url.RouteUrl("", new { controller = "Destination",  action = "DestinationDetail", title = Utilities.Encode(ViewBag.CountryName),  name = Utilities.Encode(ViewBag.AreaName), destination = Utilities.Encode(Model.listDestination[2 * i + 1].Name)  })">@Model.listDestination[2 * i + 1].Name</a></h4>
                                  
                                    <span>@Model.listDestination[2 * i + 1].Description...</span>
                                </div>
                                }
                            }
                        </div><!--/ .span6 wheretosay-->
                    }
                       <div id="slide-pager">
                                            <a  href="#" id="wherewego_next"><img src="@Url.Content("~/Content/cssFrontEnd/images/btn-down.png")" /></a>
                                        </div><!--/ #slide-pager-->
                </div><!--/ .box-about-->
            }else{
                <h5>Nội dung trang web đang được cập nhật</h5>
            }
        </div>
            <!--/ .row-fluid-->
        </div>
        <!--/ .row-fluid-->
    </div>
    <!--/ .row-fluid-->
</div>
